package cn.b.sky.flowable.dao;

import cn.b.sky.flowable.model.DeploymentNode;
import cn.b.sky.flowable.model.FlowNode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeploymentNodeDao {

  List<DeploymentNode> selectDeploymentNodeByDeployIdAndTenantId(@Param("deploymentId") String deploymentId,
                                                                 @Param("tenantId") String tenantId);

  DeploymentNode selectDeploymentNodeByDeployIdAndCode(@Param("deploymentId") String deploymentId,
                                                       @Param("tenantId") String tenantId, @Param("code") String code);

  DeploymentNode selectFlowNodeMoreByDeployIdAndCode(@Param("deploymentId") String deploymentId,
                                                     @Param("tenantId") String tenantId, @Param("code") String code);

  void saveDeploymentNode(FlowNode node);

  void updateDeploymentNode(DeploymentNode node);

  void deleteDeploymentNode(@Param("deploymentId") String deploymentId,
                            @Param("code") String code, @Param("tenantId") String tenantId);

  String selectStartFormKeyByDeploymentIdAndTenantId(@Param("deploymentId") String deploymentId,
                                                     @Param("tenantId") String tenantId, @Param("type") String startevent);

}
